home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000000_icon-group-sender _Mon Apr 27 08:09:24 1998.msg next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id IAA18112
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Mon, 27 Apr 1998 08:09:23 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA06896; Mon, 27 Apr 1998 08:09:20 -0700
  7. Date: Fri, 24 Apr 1998 13:14:00 -0700
  8. From: Gregg Townsend <gmt>
  9. Message-Id: <9804242014.AA14229@hawk.CS.Arizona.EDU>
  10. To: dpfj@globalnet.co.uk, icon-group
  11. Subject: Re:  Using icon pipe features
  12. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  13. Status: RO
  14. Content-Length: 1078
  15.  
  16. Most Unix utilities will buffer their output if it's connected to a pipe.
  17. That means that even if you were able to open a two-way pipe to something
  18. like "sed", you wouldn't be able to just write it a line and then read
  19. the filtered result.  You'd need to write enough lines to make sed flush
  20. its buffer before you'd be able to read anything back.  This, of course,
  21. gets somewhat tricky, because sed can block if too much accumulates in 
  22. its output pipe.  The tough part is that the buffering is going on
  23. inside the forked process where you can't generally control it.
  24.  
  25. I've speculated that it might be possible to make something work using
  26. pseudo-terminals (pttys), but I haven't tried it.
  27.  
  28.    ---------------------------------------------------------------------------
  29.    Gregg Townsend              Gould-Simpson Building   gmt@cs.arizona.edu
  30.    Staff Scientist             1040 E. 4th St.          32 13 45N  110 57 16W
  31.    Dept. of Computer Science   PO Box 210077            tel: +1 520 621 4325
  32.    The University of Arizona   Tucson, AZ  85721-0077   fax: +1 520 621 4246
  33.